From: Roger Pau Monne Date: Tue, 28 Jun 2011 12:56:53 +0000 (+0100) Subject: xend: NetBSD portability fix for LVM raw volume names X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10100 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=685373b4bc896fa181be0185bd52bed6dd9737b0;p=xen.git xend: NetBSD portability fix for LVM raw volume names Xen 4.1.1 was incorrectly passing /dev/rmapper/vg-lvname to pygrub (notice the r in front of mapper), when it should pass /dev/mapper/rvg-lvname (add the r to the last file) when using NetBSD. I've patched it to work correctly. I'm attaching a unified diff with the patch made against Xen 4.1.1 (it's a really simple modification). From: Roger Pau Monne Signed-off-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/python/xen/xend/XendBootloader.py b/tools/python/xen/xend/XendBootloader.py index 74c9a2ac19..f17428eaa4 100644 --- a/tools/python/xen/xend/XendBootloader.py +++ b/tools/python/xen/xend/XendBootloader.py @@ -44,7 +44,7 @@ def bootloader(blexec, disk, dom, quiet = False, blargs = '', kernel = '', raise VmError(msg) if os.uname()[0] == "NetBSD" and disk.startswith('/dev/'): - disk = disk.replace("/dev/", "/dev/r") + disk = "/r".join(disk.rsplit("/",1)) mkdir.parents("/var/run/xend/boot/", stat.S_IRWXU)